package controller;

import model.EBenchmark;
import model.scaling.EBenchmarkScaling;
import view.MainFrame;

/**
 * The {@code MainFrameController} controls and creates the main frame of this
 * {@code JFrame} application.
 * @author Oliver Eckstein & Sebastian Perlwitz
 *
 */
public class MainFrameController {
    
	/**
	 * The controller of tabbed pane which is always visible.
	 */
    private CtrCenterTabbedPane tabbedPaneController;
    
    /**
     * The controller of the information panel which is always visible.
     */
    private CtrInformationPanel infoPanelController;
    
    /**
     * The main calculation model for processes.
     */
    private EBenchmark eBenchmark;
    
    //#Neu
    /**
     * The main calculation model for scaling.
     */
    private EBenchmarkScaling eBenchmarkScaling;
    
    /**
     * Creates a new instance of a {@code MainFrameController}.
     */
    public MainFrameController() {
        eBenchmark = new EBenchmark();
        eBenchmarkScaling = new EBenchmarkScaling(eBenchmark); //#Neu
        infoPanelController = new CtrInformationPanel();
    	createMainFrame();
    }
    
    /**
     * Creates the main frame.
     */
    private void createMainFrame() {        
        tabbedPaneController =
                new CtrCenterTabbedPane(
                		eBenchmark,
                		eBenchmarkScaling, //#Neu
                		infoPanelController);
        new MainFrame(tabbedPaneController.getView(),
                infoPanelController.getView());
    }    
}
